<!DOCTYPE html>
<!--[if IE 8]>
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8" lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<![endif]-->
<!--[if !(IE 8) ]><!-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:wb="http://open.weibo.com/wb">
<!--<![endif]-->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>登录 &lsaquo; thisding 资源共享网</title>
    <link rel='stylesheet' th:href="@{/css/load-styles.css}" type='text/css' media='all'/>
    <style type="text/css">#login form {
        -webkit-box-shadow: 0 2px 5px 0 rgba(146, 146, 146, .1);
        -moz-box-shadow: 0 2px 5px 0 rgba(146, 146, 146, .1);
        box-shadow: 0 8px 25px 0 rgba(146, 146, 146, 0.21);
    }

    #login form .forgetmenot {
        float: none
    }

    #login form p.submit {
        padding: 20px 0 0;
    }

    #login form p.submit .button-primary {
        float: none;
        background-color: #494949;
        font-weight: bold;
        color: #fff;
        width: 100%;
        height: 40px;
        border-width: 0;
        border-color: none
    }

    #login form input {
        box-shadow: none !important;
        outline: none !important
    }
    .errmsg{
        color: red;
    }
        .login h1 a {
            background-image: url("/static/img/logo.png") /*tpa=https://www.waitsun.com/wp-content/themes/WU/img/logo.png*/;
            width: 280px;
            max-height: 100px;
            margin: 20px auto 15px;
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center center;
        }
    </style>
    <meta name='robots' content='noindex,noarchive'/>
    <meta name='referrer' content='strict-origin-when-cross-origin'/>
    <meta name="viewport" content="width=device-width"/>
    <script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=1327828830" type="text/javascript" charset="utf-8"></script>
    <!--<script type='text/javascript' src="/static/web/wp-includes/js/jquery/jquery.js"></script>-->
    <script src="../../static/web/wp-includes/js/jquery/jquery-3.3.1.min.js"></script>
</head>
<body class="login login-action-login wp-core-ui  locale-zh-cn">
<div id="login">
    <h1><a href="/" title="thisding 资源共享网" tabindex="-1">thisding 资源共享网</a></h1>

    <!--<form name="loginform" id="loginform" th:action="@{/download/sys-user/login}" method="post">-->
    <form name="loginform" id="loginform" method="post">
        <p>
            <label for="user_login">用户名或电子邮件地址<br/>
                <input type="text" name="email" id="user_login" class="input" value="" size="20"/></label>
        </p>
        <p class="submit">
        <p class="errmsg"></p>
        <input type="button" onclick="findPwd()" style="float: none;
    background-color: #494949;
    font-weight: bold;
    color: #fff;
    width: 100%;
    height: 40px;
    border-width: 0;
    border-color: none;" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="找回密码"/>
        <input type="hidden" name="redirect_to" value="https://www.waitsun.com/"/>
        <input type="hidden" name="testcookie" value="1"/>
        </p>
        <br/>

    </form>

    <p id="nav">
        <a th:href="@{/download/sys-user/toRegister}">注册</a> | <a href="/download/sys-user/toLogin" >登录</a>
    </p>

    <script type="text/javascript">

        function findPwd() {
            var email=$("#user_login").val();
            if(email.length<=0){
                $(".errmsg").text("请填写邮箱！" );
                return;
            }
            $.ajax({
                url:"/download/sys-user/sendMail",
                type:'post',
                data: {"email":email},
                // datatype: "json",
                success:function (res) {
                    $(".errmsg").text(res.msg);
                    /*if(res.code==0){
                        location.href="/";
                    }*/
                }
            });
        }


        function wp_attempt_focus() {
            setTimeout(function () {
                try {
                    d = document.getElementById('user_login');
                    d.focus();
                    d.select();
                } catch (e) {
                }
            }, 200);
        }

        wp_attempt_focus();
        if (typeof wpOnload == 'function') wpOnload();


        function qqlogin() {
            $.ajax({
                url:"/thirdAccountSettings/settingsByType",
                type:'post',
                data:{"type":18},
                success:function (res) {
                    window.open("https://graph.qq.com/oauth2.0/authorize" +
                        "?response_type=code&client_id="+res.appid+"&state=state" +
                        "&redirect_uri="+res.redirectUri);
                }
            });

        }
        
        function weiboLogin() {
            $.ajax({
                url:"/thirdAccountSettings/settingsByType",
                type:'post',
                data:{"type":17},
                success:function (res) {
                    //以下为按钮点击事件的逻辑。注意这里要重新打开窗口
                    //否则后面跳转到QQ登录，授权页面时会直接缩小当前浏览器的窗口，而不是打开新窗口
                    window.open("https://api.weibo.com/oauth2/authorize" +
                        "?client_id="+res.appid +
                        "&redirect_uri="+res.redirectUri);
                }
            });
        }

    </script>

    <p id="backtoblog"><a href="/">&larr; 返回到thisding 资源共享网</a></p>

</div>


<div class="clear"></div>
</body>
</html>
	